/*
 * 文件名：PushController.java
 * 版权：
 * 描述：TODO
 * 修改人：zuo liubo
 * 修改时间：2013-3-26 上午10:41:24
 */
package com.scpii.api.controller.push;

import java.util.List;

import javax.annotation.Resource;

import org.codehaus.jackson.type.TypeReference;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.scpii.api.common.annoation.Pagination;
import com.scpii.api.common.base.BaseController;
import com.scpii.api.domain.auth.UsersInfoDetails;
import com.scpii.api.domain.content.Body;
import com.scpii.api.domain.push.Message;
import com.scpii.api.domain.push.UserMessageDevices;
import com.scpii.api.domain.push.UserMessages;
import com.scpii.api.service.push.PushService;
import com.scpii.api.util.JsonUtil;
import com.scpii.api.util.PrincipalUtil;

/**
 * @description PUSH controller
 * @author zuo liubo
 * @date 2013-3-26
 */
@Controller
@RequestMapping("/push")
public class TestController extends BaseController {

	@Resource
	private PushService pushService;

	@RequestMapping(value = "/userMessageDevice/{userMessageDeviceId}/{messageStatus}", method = RequestMethod.GET)
	@ResponseBody
	public Object getMessageByUser(@PathVariable("userMessageDeviceId") Long userMessageDeviceId,
			@PathVariable("messageStatus") Integer messageStatus) throws Exception {
		return pushService.updateStatus4Test(userMessageDeviceId, messageStatus) > 0;
	}


}
